1. Field of the Invention
The present invention relates to the decoding of compressed video sequence consisting of a sequence header followed by one or more groups of coded pictures. The present invention is particularly concerned with a technique whereby compressed pictures are properly decoded even if the header information is corrupted or lost.
2. Description of the Related Art
Error correction decoders have been developed and used extensively for decoding coded pictures which have been subjected to a forward error correction process at the source site. At a sink site, error correction bits are detected and used to correct data in error. However, if the signal has been corrupted beyond the error correcting capability of the decoder, forward error correction does not work properly. To this end, a replacement technique has been proposed whereby the corrupted portion of data is replaced with one that is properly decoded in previous signals. Japanese Patent Publication 6-98313 discloses this replacement technique.
However, if an error occurs in the header of a compressed video signal and the correction process at the sink site fails to properly correct the error, subsequent decoding of video signals is detrimentally affected. In the MPEG format, picture size information is contained in the sequence header. If this information is corrupted, the information necessary for properly recovering a subsequent group of compressed pictures would be lost entirely and normal reproduction of pictures is impossible.
It is therefore an object of the present invention to provide a video decoding apparatus and method that allows coded video signals to be recovered even when the header information is corrupted.
According to a first aspect, the present invention provides a video decoding apparatus for decoding a coded video signal containing a sequence header and at least one coded picture, the sequence header including picture size data, the apparatus comprising a sequence header decoder for decoding a coded sequence data contained in the header and storing the decoded sequence data in a memory, a video decoder for performing a decoding process on a coded picture and producing a first macroblock count from the decoded picture and suspending the decoding process when the first macroblock count is produced, the macroblock count representing a number of macroblocks contained in the decoded picture, and control circuitry for (a) determining a second macroblock count from picture size of the sequence data stored in the memory, (b) comparing the first macroblock count with the second macroblock count, (c) if the first and second macroblock counts are not equal to each other, estimating a picture size based on the second macroblock count and correcting the sequence data in the memory with data representing the estimated picture size, and (d) instructing the video decoder to resume the decoding process by using the sequence data of the memory immediately after the first and second macroblock counts are determined to be equal to each other or immediately after the sequence data in the memory is corrected.
According to a second aspect, the present invention provides a method of decoding a coded video signal containing a sequence header and at least one coded picture, the sequence header including picture size data, the method comprising the steps of (a) decoding a coded sequence data contained in the header and storing the decoded sequence data in a memory, (b) performing a decoding process on a coded picture and producing a first macroblock count from the decoded, the macroblock count representing a number of macroblocks contained in the decoded picture, (c) suspending the decoding process, (d) determining a second macroblock count from picture size of the sequence data stored in the memory, (e) comparing the first macroblock count with the second macroblock count, (f) if the first and second macroblock counts are equal to each other, resuming the decoding process on the coded picture by using the sequence data of the memory, (g) if the first and second macroblock counts are not equal to each other, estimating a picture size based on the second macroblock count, (h) correcting the sequence data in the memory with data representing the estimated picture size, and (i) resuming the decoding process on the coded picture by using the corrected sequence data of the memory.